Skip to main content

🤖 Review Contract

Introduction​

This API allows users to send transaction information via a POST request, and n8n will automatically evaluate and rate the transaction. The API processes the content and returns an analysis based on the provided model.

Review Contract​

Endpoint​

Use the following endpoint to submit the transaction for review:

POST https://n8n.lchatai.com/execute/review-contact

Headers​

The API requires the following headers:

  • X-N8N-API-KEY - Your n8n API key for authentication
  • Content-Type: multipart/form-data

Request Parameters​

The API expects the following parameters as multipart/form-data fields:

  • model (string) - The AI model to use. Accepted values:

    ProviderModels
    OpenAIgpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-3.5-turbo, gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-5.2, gpt-5.2-pro, gpt-5, gpt-5-mini, gpt-5-nano
    Geminigemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-lite, gemini-3-flash-preview, gemini-3.1-pro-preview
    Claudeclaude-sonnet-4-6, claude-opus-4-6, claude-opus-4-5-20251101, claude-haiku-4-5-20251001, claude-sonnet-4-5-20250929, claude-opus-4-1-20250805, claude-opus-4-20250514, claude-sonnet-4-20250514
  • prompt (string) - The specific prompt to provide for the transaction review.

  • llmKey (string) - Your API key for the selected model.

  • content (string) - The transaction text to be reviewed. Use this field when submitting plain text. Leave empty ("") when uploading a file via the file field.

  • file (file) - A PDF or document file containing the transaction. Use this field when submitting a file. Leave empty ("") when using the content field.

warning

Exactly one of content or file must be provided per request. If you are sending text, pass file="". If you are uploading a file, pass content="".

Example Request​

Text Content

curl --location 'https://n8n.lchatai.com/execute/review-contact' \
--header 'X-N8N-API-KEY: ey*********' \
--form 'model="gpt-4o-mini"' \
--form 'prompt="..."' \
--form 'content="Transaction text content here..."' \
--form 'llmKey="sk-proj-ERa23*******"' \
--form 'file=""'

File Upload

curl --location 'https://n8n.lchatai.com/execute/review-contact' \
--header 'X-N8N-API-KEY: ey*********' \
--form 'model="gpt-4o-mini"' \
--form 'prompt="..."' \
--form 'content=""' \
--form 'llmKey="sk-proj-ERa23*******"' \
--form 'file=@"/path/to/transaction.pdf"'

Response​

The response body contains the following two keys:

  • response (string): The result of the transaction review, which provides the evaluation and rating of the submitted transaction.
  • execution_id (integer): A unique identifier for the specific execution of the transaction review workflow.
{
"response": ".....",
"execution_id": 778
}